Repository navigation
Reimplement 1 Credits function at 100% from #531 - #548
Merged
Merged
Conversation
…0348_2 Taken from draft sourcehold#531. Measured on main 40cbb1c with only this file in .local and both resolver sets enabled: reccmp 95.7% raw, the only differences being the 31.0f float constant name and the array-end data label, so it is counted as 100% per main's convention. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
|
Style guide reading (advisory, posted once) 1 possible deviation(s) from REIMPLEMENTATION_STYLE_GUIDE.md across 1 of the 1 reimplemented The match comes first. Where the ugly form is what matched, it stays -- that is the guide's own overriding rule, and rule 21 asks for a one-line comment saying what was measured so the next reader does not retry it. This report is posted once, when the PR opens, and is not repeated on later pushes.
WhereRule 1 — Drop the decompiler trailing
|
…UIDE - named parameters (elementType, fadeMode, field20Unk/field24Unk/field28Unk) and freeIndex instead of param_N/_index - early returns instead of the nested ifs, else-if for the fade mode - countof(DAT_ARRAY_00ec0348::instance) instead of 24 - dropped the trailing return; namespace closing comments Re-measured on main 40cbb1c: unchanged at 95.7 / 94.7, only the 31.0f constant name and the array-end label differ. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
The values follow RenderActiveCreditsElements on main: 0 is a free slot, 1 an image, 2 text, 3 a hover image and 4 a bordered box. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
The values follow RenderActiveCreditsElements on main: 1 lowers blendStrength to below 1 and then clears the mode (fade in), 2 raises it past 31 and then frees the element (fade out). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
CET_TEXT / CET_NONE for the element type and CFM_FADE_IN / CFM_FADE_OUT for the fade mode instead of raw numbers. Re-measured on main 592a17d with a full build and reccmp: unchanged at 95.7 / 94.7 (only the 31.0f constant name and the array-end label differ). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
Contributor
Author
|
No match-driven forms remain in
|
…1-matched Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp
TheRedDaemon
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR carries the finished part of draft #531 (
reimpl/ui-rendering-directdraw-development). That is one function,UI::Credits::InsertElementIntoArrayAt_ec0348_2. The file is taken unchanged from the draft and compiles against main's headers as it is.Measured on
origin/main(40cbb1c): I ran a full DLL build with only this file incmake/openshc-sources.txt.local. Both resolver sets were switched on: the struct resolvers throughenable_reimplemented_data.pyand the function resolver throughenable_local_functions.py. I then ran reccmp.UI::Credits::InsertElementIntoArrayAt_ec0348_2100.0% | Reimplemented (counted: only the 31.0f float constant name and the array-end data label differ)The only differences in the reccmp diff are labels, so the function counts as 100% under main's convention:
fld dword ptr [<OFFSET>]in the original againstfld dword ptr [31.0 (FLOAT)]in ours;cmp ecx, I<int>::instancein the original againstcmp ecx, cachedin ours. This is the end-of-array address ofDAT_ARRAY_00ec0348, labelled differently.Header changes: none. The two enum headers this function uses (values taken from
RenderActiveCreditsElements) are on main now, identical, through 0701799 ("upstream ghidra changes"), and the branch merges it:UI/Enums/CreditsElementType.hpp(+Int):CET_NONE,CET_IMAGE,CET_TEXT,CET_HOVER_IMAGE,CET_BORDERED_BOX.UI/Enums/CreditsFadeMode.hpp(+Int):CFM_NONE,CFM_FADE_IN(blend strength 31 down to 1),CFM_FADE_OUT(1 up to 31, then the element is freed).GL / visibility entries: none. The draft adds
/GLand visibility entries only so thatProcessCreditsScriptCommandscan see itsInsertElement*callees. That function stays in the draft, and this function matches without them.Overlap with open PRs: none. No other open PR touches this file.
Left in the draft:
ProcessCreditsScriptCommands(83.0%): the case-4 scheduling and the placement of the case-22 edge block still differ.WindowMsgProcessingFunc(86.8%): the block layout still differs, not just register allocation.Draft #531 stays open for those two functions.
I re-checked both with the clarified "register allocation only" rule (no functional difference, and only allocation-kind differences left), and neither qualifies:
ProcessCreditsScriptCommands: the case-22 edge block sits in a different place, and the scheduling differs.WindowMsgProcessingFunc: block layout differs, memory operands are folded into the instructions in one version and loaded separately in the other, andleais used in place ofadd.Style pass (88b70cd):
InsertElementIntoArrayAt_ec0348_2now followsREIMPLEMENTATION_STYLE_GUIDE.mdas it is on main.elementType,fadeMode,field20Unk/field24Unk/field28Unk) instead ofparam_N, andfreeIndexinstead of_index.countof(DAT_ARRAY_00ec0348::instance)instead of24.return;, and comments on the closing namespaces.Re-measured with a full build and reccmp: unchanged at 95.7 / 94.7, and only the labels differ. No change had to be reverted.
Pre-review pass (e910e4b): merged main 592a17d, and the function now uses the two enums instead of raw numbers. The measurement is unchanged at 95.7 / 94.7.
Merge of main 0701799: a full build with both resolver sets and reccmp give the same 95.7 / 94.7, with only the same two labels differing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XmXCmXCVBvESeaU1djQFjp